﻿using H.Types;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace H.Hands.Remotings
{
    /// <summary>
    /// 鼠标任务远程实例
    /// </summary>
    public class MouseRef : MarshalByRefObject, IMouse
    {
        /// <summary>
        /// 内部管理的键鼠实例
        /// </summary>
        private readonly IMouse _Mouse;

        /// <summary>
        /// 封装一个键鼠实例
        /// </summary>
        /// <param name="mouse"></param>
        public MouseRef(IMouse mouse)
        {
            _Mouse = mouse;
        }

        ///<inheritdoc/>
        public bool Click()
        {
            return _Mouse.Click();
        }

        ///<inheritdoc/>
        public bool Click(Pos pos)
        {
            return _Mouse.Click(pos);
        }

        ///<inheritdoc/>
        public bool Click(Rect rect)
        {
            return _Mouse.Click(rect);
        }

        ///<inheritdoc/>
        public bool DoubleClick()
        {
            return _Mouse.DoubleClick();
        }

        ///<inheritdoc/>
        public bool DoubleClick(Pos pos)
        {
            return _Mouse.DoubleClick(pos);
        }

        ///<inheritdoc/>
        public bool DoubleClick(Rect rect)
        {
            return _Mouse.DoubleClick(rect);
        }

        ///<inheritdoc/>
        public bool Down()
        {
            return _Mouse.Down();
        }

        ///<inheritdoc/>
        public bool Up()
        {
            return _Mouse.Up();
        }
    }
}
